<?php
/**  测试请求entrance
 * Created by PhpStorm.
 * User: KaZeline
 * Date: 15-10-14
 * Time: 上午10:59
 */
//exit;
$url = 'http://dev.12301.cc/api/user/entrance.php';
$query = array(
    'ac'=>'xiamenpiaofutong',
    'pw'=>md5('zheshimima#12301'),
    'action'=>'GetPartner',
//    'account'=>15359618999,
    'fid'=>'55',
//    'password'=>'e10adc3949ba59abbe56e057f20f883e',
    //'aid'=>'4',
//    'mobile'=>'15359618997',
//    'dname'=>'郑小娜2',
//    'dtype'=>1,
//    'page'=>5,
//    'vcode'=>'780101',
//    'csj'=>1,
//    'invId'=>4,
//    'apply_did'=>55,
//    'openid'=>'o3W2otzRTIvepm7RvOQnGoOJhzPk',
//    'card_no'=>8087
'page'=>'55'

);
ksort($query);
$query_str = http_build_query($query);
$query['sign']=md5($query_str);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSLVERSION, 1);
$res = curl_exec($ch);
var_dump($res);
echo '<pre>';
$res1  = base64_decode($res);
$res  = json_decode(base64_decode($res),true);
print_r($res);
echo '</pre>';